package com.jb.repair.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.jb.repair.R;
import com.jb.repair.model.DocH2Model;

import java.util.List;

/**
 * Created by gaobin on 2015/11/17.
 */
public class DocMenuh2Adapter extends BaseAdapter {
    private Context context;
    private List<DocH2Model> mData;
    private LayoutInflater mInflater;

    public DocMenuh2Adapter(Context context, List<DocH2Model> mData) {
        this.context = context;
        this.mData = mData;
        mInflater = LayoutInflater.from(context);
    }

    @Override
    public int getCount() {
        return mData.size();
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        convertView = mInflater.inflate(R.layout.item_doc_menu_child,null);
        TextView tv_name = (TextView) convertView.findViewById(R.id.tv_name);

        tv_name.setText(mData.get(position).type);

        return convertView;
    }
}
